<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
    </head>
    <body>
    <script type="text/javascript">
        function createPop(type,text){
            var o=new Object()
            o.content=text;
            o.show=function(){

            }
            if(type=='alert'){

            }
        }
        function createBook(name,time,type){
            var o=new Object()
            o.name=name;
            o.type=type;
            o.time=time
            o.getTime=function(){
                console.log(this.time)
            }
            return o;
        }
        var book1=createBook('js book','2018','js')
        book1.getTime()
    </script>
    </body>
</html>